{assign var='header' value='header2'}
{include file="top.html"}
<link rel="stylesheet" href="/style/artDialog/skins/225.css">
<script src="/style/artDialog/artDialog.js?skin=225'" type="text/javascript"></script>
<script src="/style/jquery.ajaxContent.pack.js" type="text/javascript"></script>
<script src="/style/lefttime.js"></script>
<div id="content" class="container detail">
    <div class="slider" id="single-item">
        {foreach from=$data.pics item=m key=key}
        {if $m.imgurl_src && $key<5}
        <div><img src="{zz mod=fileurl source=$m.imgurl_src width=400 type=0}" /></div>
        {/if}
        {/foreach}
    </div>

    <div class="info mb10">
        <p class="title">{$data.row.title}</p>
        <div class="count">
            <i class="ap-icon icon-count"></i>
            剩余：
            <span id="leftTime{$data.row.act_id}">请稍等, 正在载入中...</span>
            <script type="text/javascript">
                onload_leftTime('{$data.row.act_id}',"{$data.row.diff_time}","{$data.row.status}");
            </script>
        </div>
        <p style="padding-top:10px;"><del>市场价：{$data.row.price|price_format}</del></p>
        {if $data.row.desc.0}
        <p>商品来源：<a href="{$data.row.desc.1}" class="blue" target="_blank">{$data.row.desc.0}</a> <span class="gray">（正品保障）</span></p>
        {/if}
        {if $data.row.amplitude > 0}
        <p>加价幅度：<span class="blue">{$data.row.amplitude|price_format}</span></p>
        {/if}
        {if $data.row.deposit > 0}
        <p>{$L.unit_pay}保证金：<span class="red">{$data.row.deposit|price_format}</span> （<span class="gray">{$L.unit_pay}结束后退还到您的帐户余额</span>）</p>
        {/if}
        <p>{$L.unit_pay}模式：<span class="red">{if $data.row.type eq 0}{$L.unit_winning}{else}{$L.unit_pay}+{$L.unit_winning}{/if}</span> <span class="gray">（{if $data.row.type eq 0}本{$L.unit_pay}为{$L.unit_winning}模式，只有一次出价机会{if $data.row.typenum gt 0}，参与人数超过<span class="red">{$data.row.typenum}</span>人，最高出价者将获得商品{/if}{else}本{$L.unit_pay}最高出价者{$L.unit_pay}成功，同时首次出价者还有一次{$L.unit_winning}机会{/if}）</span></p>
        <p style="display: none;">开奖处理：<span class="gray">工作日每天下午3:00-4:00，系统计算当天14点前所有首次出价结果</span></p>
        <p>{$L.unit_winning}人数：{$data.codCount}/{if $data.row.winnum<0}不限数量{elseif $data.row.winnum>0}{$data.row.winnum}{else}0{/if} <span class="gray">（{if $data.row.winnum<0}本{$L.unit_pay}{$L.unit_winning}人数不限数量{elseif $data.row.winnum>0}本{$L.unit_pay}最大{$L.unit_winning}数为前{$data.row.winnum}位{$L.unit_winning}者{else}本{$L.unit_pay}未设置{$L.unit_winning}{/if}）</span></p>
        {if $data.row.painum > 0}
        <p><a href="{'/content/index/78'|url}">{$L.unit_pay_points}</a>限额：{$data.row.painum} <span class="gray">（若您{$L.unit_pay}成功或{$L.unit_winning}，下单时最多可使用{$L.unit_pay_points}的数量）</span></p>
        {/if}
        {if $data.row.paib}
        <p>扣除<a href="{'/content/index/78'|url}">{$L.unit_pay_points}</a>：{$data.row.paib} <span class="gray">（本商品首次出价即扣相应{$L.unit_pay_points}数，{$L.unit_pay_points}不足则无法出价）</span></p>
        {/if}
        <div class="pai">
            <div class="pai-btn">
                {if $data.row.current_price > 0}
                <span><em id>{$data.row.current_price}</em> ￥</span>
                {else}
                <span><em>{$data.row.paib}</em> {$L.unit_pay_points}</span>
                {/if}
                <div class="btn-auc">
                    {if $smarty.session.mid}
                    <a href="javascript:;" id="qjA">出价</a>
                    {else}
                    <a href="{'/member/login'|url}">登陆</a>
                    {/if}
                </div>
            </div>
            {$L.unit_winning}率：<span class="red">{$data.row.win}%</span>，已有<span class="red" id="BidCount">{$data.row.bid_user_count}</span>人参与
        </div>
    </div>
    {include file="auction/lbi/qujia.html"}

    <div class="detail-bd tab">
        <ul class="detail-nav tab-nav ui-clr">
            <li>商品描述</li>
            <li onclick="mLoad('log')">出价历史</li>
            <li onclick="mLoad('cod')">{$L.unit_winning}名单</li>
            <li onclick="mLoad('share')">晒单</li>
        </ul>
        <div class="tab-bd">
            <div class="tab-item detail-info">
                {picurl($data.row.content|stripcslashes)}
                {if $data.row.price > 5000}
                <div class="special">重要说明：商品获得者拥有 {$data.row.title} 10年免费使用权</div>
                {/if}
            </div>
            <div class="tab-item">
                <ul class="offer-list offer-win" id="log"></ul>
                <div class="loading getMore_log"></div>
            </div>
            <div class="tab-item">
                <ul class="offer-list offer-win" id="cod"></ul>
                <div class="loading getMore_cod"></div>
            </div>
            <div class="tab-item">
                <div class="shareList" style="padding: 0">
                    <div class="item"></div>
                </div>
                <div class="loading getMore"></div>
            </div>
        </div>
    </div>
</div>

{include file="footer.html"}
<script src="/style/mobile/js/slick.min.js"></script>
<script src="/style/mobile/js/jquery-pageload.js"></script>
<script src="/style/mobile/js/jquery.more.js"></script>
<script>
    $(function(){
        $('#single-item').slick({
            autoplay: true,
            arrows: false,
            dots: true
        });
        tabs(".tab", ".tab-nav li", ".tab-item", "on", "click");
    });

    var isLoad = {
        "log":false,
        "cod":false,
        "share":false
    };

    function mLoad(type){
        if(isLoad[type]==false){
            if(type == 'share'){
                $('.shareList').more({
                    'address': '/content/share_ajax?goods_id={$data.row.goods_id}&type=auc',
                    'amount' : 10
                })
            }else{
                $('#'+type).pageload({
                    url: '/auction/ajax_log',
                    param: 'id={$data.row.act_id}&status='+type,
                    trigger: '.getMore_'+type
                });
            }
            isLoad[type] = true;
        }
    }
</script>